const mimeTypes = require('../constant/mime-types.js')

module.exports = {
  /**
   * @function 文件头获取 
  */
  getMime (extname) {
    extname = String(extname).toLowerCase().trim()
    extname = ('.' + extname).replace(/^\.+/, '.')
    return mimeTypes[extname] || 'application/txt'
  }
}